-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tests: remove redundant native ssh tests #3104
Conversation
47c8a6d
to
5383af8
Compare
@@ -156,14 +156,12 @@ def _remove_file(self, path): | |||
def _remove_dir(self, path): | |||
for root, dirs, files in self.walk(path, topdown=False): | |||
for fname in files: | |||
path = posixpath.join(root, fname) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was a pretty nasty bug 🙁 Added a test
url_info = URLInfo(remote_url) | ||
mkdir_cmd = "mkdir dir-out;cd dir-out;echo 1 > 1.txt; echo 2 > 2.txt" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This actually didn't work because of the bug in remove
. That is why you need to use &&
to ensure that no error occurs. Same complaint as when people don't use set -e \n set -x
in their bash scripts 🙂
We already have mocked ones, which are more reliable as they use their own paramiko server instead of relying on the sshd running on the test machine. Native tests are also quite flaky and fail sometimes due to network issues.
85f09b7
to
b6955d7
Compare
It is already available in the standard hooks.
@efiop , sorry for the late re-review, looks good, tho 😅 |
We already have mocked ones, which are more reliable as they use their
own paramiko server instead of relying on the sshd running on the test
machine. Native tests are also quite flaky and fail sometimes due to
network issues.
❗ Have you followed the guidelines in the Contributing to DVC list?
📖 Check this box if this PR does not require documentation updates, or if it does and you have created a separate PR in dvc.org with such updates (or at least opened an issue about it in that repo). Please link below to your PR (or issue) in the dvc.org repo.
❌ Have you checked DeepSource, CodeClimate, and other sanity checks below? We consider their findings recommendatory and don't expect everything to be addressed. Please review them carefully and fix those that actually improve code or fix bugs.
Thank you for the contribution - we'll try to review it as soon as possible. 🙏